<template>
  <!-- 售后管理 -->
  <div>
    <div>
      <el-form :inline="true" class="demo-form-inline">
        <el-form-item label="售后单号">
          <el-input></el-input>
        </el-form-item>
        <el-form-item label="售后单状态">
          <el-select placeholder="请选择">
            <el-option label="区域一" value="shanghai"></el-option>
            <el-option label="区域二" value="beijing"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="订单来源渠道">
          <el-select placeholder="请选择">
            <el-option label="区域一" value="shanghai"></el-option>
            <el-option label="区域二" value="beijing"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="售后单类型">
          <el-select placeholder="请选择">
            <el-option label="区域一" value="shanghai"></el-option>
            <el-option label="区域二" value="beijing"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="子订单号">
          <el-input></el-input>
        </el-form-item>
        <el-form-item label="用户手机号">
          <el-input></el-input>
        </el-form-item>
        <el-form-item label="用户ID">
          <el-input></el-input>
        </el-form-item>
        <el-form-item label="申请时间" required>
          <el-col :span="11">
            <el-form-item prop="date1">
              <el-date-picker type="date" placeholder="选择日期" style="width: 100%;"></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col class="line" :span="2">-</el-col>
          <el-col :span="11">
            <el-form-item prop="date2">
              <el-time-picker placeholder="选择时间" style="width: 100%;"></el-time-picker>
            </el-form-item>
          </el-col>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">查询</el-button>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">重置</el-button>
        </el-form-item>
      </el-form>
    </div>
    <div>
      <el-table :data="tableData" style="width: 100%">
        <el-table-column label="售后单编号">
          <template slot-scope="scope">
            <el-button type="text" @click="toAfterSale(scope.row)">{{scope.row.afterSaleId}}</el-button>
          </template>
        </el-table-column>
        <el-table-column label="子订单编号">
          <template slot-scope="scope">
            <el-button type="text" @click="viewDetail(scope.row)">{{scope.row.subOrderId}}</el-button>
          </template>
        </el-table-column>
        <el-table-column prop="userId" label="用户ID"></el-table-column>
        <el-table-column prop="productInfo" label="商品信息"></el-table-column>
        <el-table-column prop="orderAmount" label="订单金额"></el-table-column>
        <el-table-column prop="applyTime" label="售后单申请时间"></el-table-column>
        <el-table-column prop="afterSaleType" label="售后单类型"></el-table-column>
        <el-table-column prop="afterSaleStatus" label="售后单状态"></el-table-column>
        <el-table-column label="操作">
          <template slot-scope="scope">
            <el-button type="text" @click="viewDetail(scope.row)">同意申请</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>
    <div>
      <el-pagination background layout="prev, pager, next" :total="1000"></el-pagination>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      tableData: [
        {
          afterSaleId: "SH2024001",
          subOrderId: "SO2024001",
          userId: "123456",
          productInfo: "商品A",
          orderAmount: "￥100",
          applyTime: "2024-05-01 09:00:00",
          afterSaleType: "退款",
          afterSaleStatus: "已完成"
        },
        {
          afterSaleId: "SH2024002",
          subOrderId: "SO2024002",
          userId: "789012",
          productInfo: "商品B",
          orderAmount: "￥150",
          applyTime: "2024-05-02 10:30:00",
          afterSaleType: "换货",
          afterSaleStatus: "处理中"
        }
        // 根据需要添加更多示例数据
      ]
    };
  },
  methods: {
    toAfterSale(){
          this.$router.push({path:"/AfterSaleInfo"})
    }
  },
  created() {},
  mounted() {}
};
</script>

<style scoped></style>